\(\int \frac {1-x^2}{1+3 x^2+x^4} \, dx\) [83]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 39 \[ \int \frac {1-x^2}{1+3 x^2+x^4} \, dx=-\arctan \left (\sqrt {\frac {2}{3+\sqrt {5}}} x\right )+\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ) \]

[Out]

-arctan(x*2^(1/2)/(3+5^(1/2))^(1/2))+arctan(x*(1/2+1/2*5^(1/2)))

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {1177, 209} \[ \int \frac {1-x^2}{1+3 x^2+x^4} \, dx=\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right )-\arctan \left (\sqrt {\frac {2}{3+\sqrt {5}}} x\right ) \]

[In]

Int[(1 - x^2)/(1 + 3*x^2 + x^4),x]

[Out]

-ArcTan[Sqrt[2/(3 + Sqrt[5])]*x] + ArcTan[Sqrt[(3 + Sqrt[5])/2]*x]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 1177

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && GtQ[b^2
 - 4*a*c, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \left (-1-\sqrt {5}\right ) \int \frac {1}{\frac {3}{2}+\frac {\sqrt {5}}{2}+x^2} \, dx+\frac {1}{2} \left (-1+\sqrt {5}\right ) \int \frac {1}{\frac {3}{2}-\frac {\sqrt {5}}{2}+x^2} \, dx \\ & = -\tan ^{-1}\left (\sqrt {\frac {2}{3+\sqrt {5}}} x\right )+\tan ^{-1}\left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.26 \[ \int \frac {1-x^2}{1+3 x^2+x^4} \, dx=\arctan \left (\frac {x}{1+x^2}\right ) \]

[In]

Integrate[(1 - x^2)/(1 + 3*x^2 + x^4),x]

[Out]

ArcTan[x/(1 + x^2)]

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.36

method result size
risch \(-\arctan \left (x \right )+\arctan \left (x^{3}+2 x \right )\) \(14\)
parallelrisch \(\frac {i \ln \left (x^{2}-i x +1\right )}{2}-\frac {i \ln \left (x^{2}+i x +1\right )}{2}\) \(28\)
default \(-\frac {2 \left (-5+\sqrt {5}\right ) \sqrt {5}\, \arctan \left (\frac {4 x}{2 \sqrt {5}-2}\right )}{5 \left (2 \sqrt {5}-2\right )}-\frac {2 \sqrt {5}\, \left (5+\sqrt {5}\right ) \arctan \left (\frac {4 x}{2 \sqrt {5}+2}\right )}{5 \left (2 \sqrt {5}+2\right )}\) \(66\)

[In]

int((-x^2+1)/(x^4+3*x^2+1),x,method=_RETURNVERBOSE)

[Out]

-arctan(x)+arctan(x^3+2*x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.33 \[ \int \frac {1-x^2}{1+3 x^2+x^4} \, dx=\arctan \left (x^{3} + 2 \, x\right ) - \arctan \left (x\right ) \]

[In]

integrate((-x^2+1)/(x^4+3*x^2+1),x, algorithm="fricas")

[Out]

arctan(x^3 + 2*x) - arctan(x)

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.26 \[ \int \frac {1-x^2}{1+3 x^2+x^4} \, dx=- \operatorname {atan}{\left (x \right )} + \operatorname {atan}{\left (x^{3} + 2 x \right )} \]

[In]

integrate((-x**2+1)/(x**4+3*x**2+1),x)

[Out]

-atan(x) + atan(x**3 + 2*x)

Maxima [F]

\[ \int \frac {1-x^2}{1+3 x^2+x^4} \, dx=\int { -\frac {x^{2} - 1}{x^{4} + 3 \, x^{2} + 1} \,d x } \]

[In]

integrate((-x^2+1)/(x^4+3*x^2+1),x, algorithm="maxima")

[Out]

-integrate((x^2 - 1)/(x^4 + 3*x^2 + 1), x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.67 \[ \int \frac {1-x^2}{1+3 x^2+x^4} \, dx=\frac {1}{4} \, \pi \mathrm {sgn}\left (x\right ) - \frac {1}{2} \, \arctan \left (\frac {x^{4} + x^{2} + 1}{2 \, {\left (x^{3} + x\right )}}\right ) \]

[In]

integrate((-x^2+1)/(x^4+3*x^2+1),x, algorithm="giac")

[Out]

1/4*pi*sgn(x) - 1/2*arctan(1/2*(x^4 + x^2 + 1)/(x^3 + x))

Mupad [B] (verification not implemented)

Time = 13.51 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.33 \[ \int \frac {1-x^2}{1+3 x^2+x^4} \, dx=\mathrm {atan}\left (x^3+2\,x\right )-\mathrm {atan}\left (x\right ) \]

[In]

int(-(x^2 - 1)/(3*x^2 + x^4 + 1),x)

[Out]

atan(2*x + x^3) - atan(x)